Skip to content

frontend: Adjust source context bar #12039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Warchamp7
Copy link
Member

Description

Various tweaks and adjustments to the context bar appearance to bring it in line with the rest of the theme.

Motivation and Context

Want all aspects of the main window to look the same. Cleans up some UX quirks I was unhappy about.

The updated design follows @GeorgesStavracas' work on the obsproject/design repository. Some adjustments have been made after implementation and testing of the original design.

Original Mockup
image

Before
image

image

image

After
image

image

image

How Has This Been Tested?

👁

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7 Warchamp7 force-pushed the context-bar-updates branch 2 times, most recently from 862ba50 to cf06745 Compare April 9, 2025 00:51
@WizardCM WizardCM added Enhancement Improvement to existing functionality UI/UX Anything to do with changes or additions to UI/UX elements. labels Apr 11, 2025
@Warchamp7 Warchamp7 force-pushed the context-bar-updates branch from cf06745 to 97e85a1 Compare April 24, 2025 18:47
@RytoEX RytoEX requested a review from GeorgesStavracas April 25, 2025 22:37
@RytoEX
Copy link
Member

RytoEX commented Apr 25, 2025

This has merge conflicts.

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review. This has merge conflicts.

.arg(palette.color(QPalette::Window).name(QColor::HexRgb))
.arg(palette.color(QPalette::WindowText).name(QColor::HexRgb)));
ui->colorPreview->setAutoFillBackground(true);
//ui->colorPreview->setAlignment(Qt::AlignCenter);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave in commented out code.

Comment on lines +4 to 5
#include <qt-wrappers.hpp>
#include <OBSApp.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: these should be swapped.

Comment on lines -307 to -310
/* force style sheet recalculation */
QString qss = widget->styleSheet();
widget->setStyleSheet("/* */");
widget->setStyleSheet(qss);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer needed?

Comment on lines +363 to +366
QString existingClasses = child->property("class").toString();
QStringList classList = existingClasses.split(" ", Qt::SkipEmptyParts);

classList.removeDuplicates();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there's an opportunity to create a private function for this since it's used multiple times. If you need both existingClasses and classList for later usage, you could return a std::pair<QString, QStringList>.

Comment on lines +201 to +203
addClass(ui->playPauseButton, "icon-media-pause");
removeClass(ui->playPauseButton, "icon-media-play");
removeClass(ui->playPauseButton, "icon-media-restart");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would setClasses(ui->playPauseButton, "icon-media-pause") be more 1:1 here (and in the other Set*State functions) instead of explicitly doing add, remove, remove?

@@ -38,7 +38,6 @@ TextSourceToolbar::TextSourceToolbar(QWidget *parent, OBSSource source)
const char *text = obs_data_get_string(settings, "text");

bool single_line = !read_from_file && (!text || (strchr(text, '\n') == nullptr));
ui->emptySpace->setVisible(!single_line);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have before/after images for the TextSourceToolbar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants